<!DOCTYPE html>
<html>
<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>产品编辑-乡土味士</title>
  <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
  <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
  <link rel="shortcut icon" href="favicon.ico">
  <link href="http://news.xiangtws.com/__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  <link href="__PUBLIC__/css/plugins/footable/footable.core.css" rel="stylesheet">
  <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">

  <link href="__PUBLIC__/css/plugins/summernote/summernote.css" rel="stylesheet">
  <link href="http://news.xiangtws.com/__PUBLIC__/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
  <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">
  <script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
  <script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
  <script src="__PUBLIC__/js/plugins/footable/footable.all.min.js"></script>
  <script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
  <script src="__PUBLIC__/js/plugins/summernote/summernote.min.js"></script>
  <script src="__PUBLIC__/js/plugins/summernote/summernote-zh-CN.js"></script>
  <!--日期显示插件-->
  <script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
  <style>
    /* Additional style to fix warning dialog position */
    #alertmod_table_list_2 {
      top: 900px !important;
    }
  </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-sm-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5>编辑商品</h5>
        </div>
        <div class="ibox-content">
          <form action="" method="post" class="form-horizontal">
            <div class="form-group">
              <label class="col-sm-2 control-label">发布人</label>
              <div class="col-sm-10">
                <div class="row">
                  <div class="col-md-3">
                    <select data-placeholder="选择用户" name="u_id" class="chosen-select form-control m-b" tabindex="2" style="width: 200px" disabled="">
                      <option value="0">未绑定</option>
                      <volist name="list_member" id="vo">
                        <option value="{$vo.id}" hassubinfo="true" <?=$vo['id']==$goods['u_id']?'selected':''?> > {$vo.nickname} </option>
                      </volist>
                    </select>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group">

              <label class="col-sm-2 control-label">活动类型</label>

              <div class="col-sm-10">

                <div class="row">

                  <div class="col-md-3">

                    <select data-placeholder="选择类型" name="category" class="chosen-select form-control m-b" tabindex="2" style="width: 200px">

                      <option value="0">未绑定</option>

                      <volist name="list_foretaste" id="vo">

                        <option value="{$vo.id}" hassubinfo="true" <?=$vo['id']==$goods['category']?'selected':''?>>

                        {$vo.title}

                        </option>

                      </volist>

                    </select>

                  </div>

                </div>

              </div>

            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">商品标签</label>
              <div class="col-sm-5">
                <input type="text" name="type_name" value="{$goods['type_name']}" class="form-control">
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">标题</label>
              <div class="col-sm-5">
                <input type="text" name="title" value="{$goods['title']}" class="form-control">
              </div>
            </div>

            <div class="form-group">

              <label class="col-sm-2 control-label">asc排序</label>

              <div class="col-sm-5">

                <input type="number" name="sorting" value="{$goods.sorting}" placeholder="" class="form-control">

              </div>

            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">首页图片</label>
              <volist name="goods.h_imgs" id="vo">
                <div class="col-sm-5">
                  <img height="100px" src="{$vo}" style="margin-right:8px;border: 1px #ccc solid;" />
                  <input type="text" name="h_imgs" value="{$vo}" class="form-control">
                </div>
              </volist>
            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">内容图片</label>
              <volist name="goods.c_imgs" id="vo">
                <div class="col-sm-5">
                  <img height="100px" src="{$vo}" style="margin-right:8px;border: 1px #ccc solid;" />
                  <input type="text" name="c_imgs" value="{$vo}" class="form-control">
                </div>
              </volist>
            </div>
            <div class="form-group">

              <label class="col-sm-2 control-label">点赞（人数）</label>

              <div class="col-md-2">

                <input type="number" name="praise_num" value="{$goods.praise_num}" placeholder="" class="form-control">

              </div>

            </div>
            <div class="form-group">

              <label class="col-sm-2 control-label">商品库存</label>

              <div class="col-md-2">

                <input type="number" name="num" value="{$goods.num}" placeholder="" class="form-control">

              </div>

            </div>

            <div class="form-group">

              <label class="col-sm-2 control-label">售价/积分</label>

              <div class="col-md-2">

                <input type="number" name="price" value="{$goods.price}" placeholder="" class="form-control">

              </div>

            </div>
            <div class="form-group">

              <label class="col-sm-2 control-label">市场价</label>

              <div class="col-md-2">

                <input type="number" name="market" value="{$goods.market}" placeholder="" class="form-control">

              </div>

            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">规格数</label>
              <div class="col-md-2">
                <input type="number" name="u_num" value="{$goods['u_num']}" class="form-control" step="0.1" />
              </div>
              <div class="col-md-1">
                <select data-placeholder="选择单位" name="unit" class="chosen-select form-control m-b" tabindex="2" style="width: 100px">
                  <option value="0">未选择</option>
                  <volist name="list_category" id="vo">
                    <option value="{$vo.id}" hassubinfo="true" <?=$vo['id']==$goods['unit']?'selected':''?> > {$vo.title} </option>
                  </volist>
                </select>
              </div>
            </div>

            <div class="form-group">

              <label class="col-sm-2 control-label">活动流程</label>

              <div class="col-sm-10">

                <textarea name="flow" style="width: 500px;height: 100px;">{$goods.flow}</textarea>

              </div>

            </div>
            <div class="form-group">

              <label class="col-sm-2 control-label">活动须知</label>

              <div class="col-sm-10">

                <textarea name="notice" style="width: 500px;height: 100px;">{$goods.notice}</textarea>

              </div>

            </div>

            <div class="form-group">
              <label class="col-sm-2 control-label">内容</label>
              <div class="col-sm-5">
                <div class="summernote">
                  {$goods['content']}
                </div>
                <textarea name="content" style=" display:none;"></textarea>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">拼团活动时间</label>
              <div class="col-sm-10">
                <input class="form-control layer-date" name="starttime" placeholder="{$goods['starttime']}" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                <input class="form-control layer-date" name="endtime" placeholder="{$goods['endtime']}" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">状态</label>
              <div class="col-sm-2">
                <select class="form-control m-b" name="state">
                  <option value="0">待审</option>
                  <option value="1">通过</option>
                  <option value="2">不通过</option>
                  <option value="3">删除</option>
                  <option value="4">结束</option>
                </select>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-4 col-sm-offset-2">
                <button class="btn btn-primary" onClick="save()">保存</button>
                <button class="btn btn-white" type="button" onclick="window.location.href='__MODULE__/Foretaste/index'">取消</button>
                <a class="btn btn-primary" onClick="clswidth()">清除图片宽</a>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
    <!--富文本-->
    $(document).ready(function(){
        $(".summernote").summernote({lang:"zh-CN"});
        $(".note-editor").css("width","80%");
        $(".note-editor").css("float","left");
        $(".note-editable").css("height","300px");
    });
    var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
<script>
    $("select[name='state'] option[value='"+"{$goods['state']}"+"']").attr("selected","selected");
    function save(){
        //添加
        html=$(".note-editable").html();
        $("textarea[name='content']").text(html);
        document.getElementById("savearc").submit();
    }//end fun
    //清除插入的图片宽度
    function clswidth(){
        $(".note-editable").find("img").css('width','');

    }//end fun

</script>
</body>
<!-- Mirrored from /theme/hplus/table_jqgrid.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
</html>